<?php 
    if($data['type'] == 'new'){
        $title = '新书';
    }elseif($data['type'] == 'free'){
        $title = '免费';
    }elseif($data['type'] == 'category'){
        if(isset($data['info']) && !empty($data['info'])){
            $title = $data['info']['cate_name'];
        }else{
            $title = '分类';
        }
    }elseif($data['type'] == 'chosen'){
        $title = '精选';
    }
?>
<!DOCTYPE HTML>
<html>
    <head lang="zh-CN">
        <meta charset="UTF-8">
        <title>享点阅读(<?php echo $title;?>)</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <!-- 设置初始缩放比例为1.0，使用设备宽度  -->
        <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
        <!-- 在iOS下开启全屏模式  -->
        <meta name="apple-mobile-web-app-capable" content="yes">
        <!-- 隐藏 Sarafi 状态栏  -->
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link href="/public/img/images/icon/xd.ico" rel="shortcut icon" />
        <link href="/public/css/comment/wapReset.css" rel="stylesheet"/>
        <link rel="stylesheet" type="text/css" href="/public/css/comment/header_top.css">
        <link rel="stylesheet" type="text/css" href="/public/css/comment/homepage_list.css">
        <link rel="stylesheet" type="text/css" href="/public/css/newBook.css">
        <link rel="stylesheet" type="text/css" href="/public/css/comment/messageInfo.css">
        <script src="/public/js/rem/rem.js"></script>
    </head>
    <body scroll="no">
        <header>
            <div class="down_app return_back" data-home="<?php echo $data['params']['from'];?>">
                <img src="/public/img/images/tabbar-back.png">
            </div>
            <div class="logo">
                <?php echo $title;?>
            </div>
            <div class="search">
                <img src="/public/img/images/tabbar-search.png" alt="搜索"  class="search_hot" />
                <img src="/public/img/images/tabbar-分类.png" alt="分类" check="false" class="classifty_btn"/>
            </div>
        </header>
        <div class="classifty">
            <ul class="classifty_nav">
                <li>
                    <img src="/public/img/images/newBookicon.png">
                    <p>新书</p>
                </li>
                <li>
                    <img src="/public/img/images/winicon.png">
                    <p>排行</p>
                </li>
                <li>
                    <img src="/public/img/images/classicon.png">
                    <p>分类</p>
                </li>
                <li>
                    <img src="/public/img/images/besticon.png">
                    <p>免费</p>
                </li>
            </ul>
        </div>
        <nav>
            <li <?php echo $data['params']['orderBy'] == 0 ? 'class="active" check="true" data-page="'.$data['params']['page'].'"' : 'data-page="1"' ;?>>最新
                <a href="javascript:;" <?php echo $data['params']['orderBy'] == 0 ? 'style="display:block"' : 'style="display:none"' ;?>></a>
            </li>
            <li <?php echo $data['params']['orderBy'] == 1 ? 'class="active" check="true" data-page="'.$data['params']['page'].'"' : 'data-page="1"' ;?>>点击
                <a href="javascript:;" <?php echo $data['params']['orderBy'] == 1 ? 'style="display:block"' : 'style="display:none"' ;?>></a>
            </li>
            <li <?php echo $data['params']['orderBy'] == 2 ? 'class="active" check="true" data-page="'.$data['params']['page'].'"' : 'data-page="1"' ;?>>连载
                <a href="javascript:;" <?php echo $data['params']['orderBy'] == 2 ? 'style="display:block"' : 'style="display:none"' ;?>></a>
            </li>
            <li <?php echo $data['params']['orderBy'] == 3 ? 'class="active" check="true" data-page="'.$data['params']['page'].'"' : 'data-page="1"' ;?>>完本
                <a href="javascript:;" <?php echo $data['params']['orderBy'] == 3 ? 'style="display:block"' : 'style="display:none"' ;?>></a>
            </li>
        </nav>
    <content>
        <div class="homepage_list" data-cached="false" <?php echo $data['params']['orderBy'] == 0 ? 'style="display:block"' : 'style="display:none"' ;?>>
            <input type='hidden' value='1' class='hide'>
            <h2>
                <?php if($title == '新书'):?>
                    <a href="javascript:;">最新上架</a>
                <?php elseif($title == '免费'):?>
                    <a href="javascript:;">最新免费</a>
                <?php elseif($title == '精选'):?>
                    <a href="javascript:;">精品推荐</a>
                <?php else:?>
                    <a href="javascript:;">最新</a>
                <?php endif;?>
                <img src="/public/img/images/shaixuna.png">
                <span>筛选</span>
            </h2>
            <?php if($data['params']['orderBy'] == 0):?>
                <?php foreach($data['list']['list'] as $n):?>
                    <li data-id="<?php echo $n['novel_id'];?>">
                        <img src="<?php echo $n['novel_cover'];?>">
                        <div>
                            <h4><?php echo $n['novel_title'];?></h4>
                            <h6><?php echo $n['novel_introduction'];?></h6>
                            <p>
                                <span>作者 <?php echo $n['novel_author'];?></span>
                                <a href="javascript:;"><?php echo $n['novel_type'];?></a>
                                <a href="javascript:;"><?php echo $n['novel_category'];?></a>
                            </p>
                        </div>
                        <a href="javascript:;"></a>
                    </li>
                <?php endforeach;?>
            <?php endif;?>
        </div>
        <div class="homepage_list" data-cached="false" <?php echo $data['params']['orderBy'] == 1 ? 'style="display:block"' : 'style="display:none"' ;?>>
            <input type='hidden' value='1' class='hide'>
            <h2>
                <?php if($title == '新书'):?>
                    <a href="javascript:;">最热新书</a>
                <?php elseif($title == '免费'):?>
                    <a href="javascript:;">最热免费</a>
                <?php elseif($title == '精选'):?>
                    <a href="javascript:;">精品推荐</a>
                <?php else:?>
                    <a href="javascript:;">最热</a>
                <?php endif;?>
                <img src="/public/img/images/shaixuna.png">
                <span>筛选</span>
            </h2>
            <?php if($data['params']['orderBy'] == 1):?>
                <?php foreach($data['list']['list'] as $n):?>
                    <li data-id="<?php echo $n['novel_id'];?>">
                        <img src="<?php echo $n['novel_cover'];?>">
                        <div>
                            <h4><?php echo $n['novel_title'];?></h4>
                            <h6><?php echo $n['novel_introduction'];?></h6>
                            <p>
                                <span>作者 <?php echo $n['novel_author'];?></span>
                                <a href="javascript:;"><?php echo $n['novel_type'];?></a>
                                <a href="javascript:;"><?php echo $n['novel_category'];?></a>
                            </p>
                        </div>
                        <a href="javascript:;"></a>
                    </li>
                <?php endforeach;?>
            <?php endif;?>
        </div>
        <div class="homepage_list" data-cached="false" <?php echo $data['params']['orderBy'] == 2 ? 'style="display:block"' : 'style="display:none"' ;?>>
            <input type='hidden' value='1' class='hide'>
            <h2>
                <?php if($title == '新书'):?>
                    <a href="javascript:;">连载新书</a>
                <?php elseif($title == '免费'):?>
                    <a href="javascript:;">连载免费</a>
                <?php elseif($title == '精选'):?>
                    <a href="javascript:;">精品推荐</a>
                <?php else:?>
                    <a href="javascript:;">连载</a>
                <?php endif;?>
                <img src="/public/img/images/shaixuna.png">
                <span>筛选</span>
            </h2>
            <?php if($data['params']['orderBy'] == 2):?>
                <?php foreach($data['list']['list'] as $n):?>
                    <li data-id="<?php echo $n['novel_id'];?>">
                        <img src="<?php echo $n['novel_cover'];?>">
                        <div>
                            <h4><?php echo $n['novel_title'];?></h4>
                            <h6><?php echo $n['novel_introduction'];?></h6>
                            <p>
                                <span>作者 <?php echo $n['novel_author'];?></span>
                                <a href="javascript:;"><?php echo $n['novel_type'];?></a>
                                <a href="javascript:;"><?php echo $n['novel_category'];?></a>
                            </p>
                        </div>
                        <a href="javascript:;"></a>
                    </li>
                <?php endforeach;?>
            <?php endif;?>
        </div>
        <div class="homepage_list" data-cached="false" <?php echo $data['params']['orderBy'] == 3 ? 'style="display:block"' : 'style="display:none"' ;?>>
            <input type='hidden' value='1' class='hide'>
            <h2>
                <?php if($title == '新书'):?>
                    <a href="javascript:;">完本新书</a>
                <?php elseif($title == '免费'):?>
                    <a href="javascript:;">完本免费</a>
                <?php elseif($title == '精选'):?>
                    <a href="javascript:;">精品推荐</a>
                <?php else:?>
                    <a href="javascript:;">完本</a>
                <?php endif;?>
                <img src="/public/img/images/shaixuna.png">
                <span>筛选</span>
            </h2>
            <?php if($data['params']['orderBy'] == 3):?>
                <?php foreach($data['list']['list'] as $n):?>
                    <li data-id="<?php echo $n['novel_id'];?>">
                        <img src="<?php echo $n['novel_cover'];?>">
                        <div>
                            <h4><?php echo $n['novel_title'];?></h4>
                            <h6><?php echo $n['novel_introduction'];?></h6>
                            <p>
                                <span>作者 <?php echo $n['novel_author'];?></span>
                                <a href="javascript:;"><?php echo $n['novel_type'];?></a>
                                <a href="javascript:;"><?php echo $n['novel_category'];?></a>
                            </p>
                        </div>
                        <a href="javascript:;"></a>
                    </li>
                <?php endforeach;?>
            <?php endif;?>
        </div>
    </content>
    <aside>
        <div>
            <h2>筛选</h2>
            <span <?php echo $title == '免费' ? 'style="display:none;"' : '';?>>属性 <a href="javascript:;"></a></span>
            <ul <?php echo $title == '免费' ? 'style="display:none;"' : '';?>>
                <li data-value="0">免 费 <img src="/public/img/images/btn-check.png"></li>
                <li data-value="1">收 费 <img src="/public/img/images/btn-check.png"></li>
            </ul>
            <span>字数 <a href="javascript:;"></a></span>
            <ul>
                <li data-value="1">30万以下 <img src="/public/img/images/btn-check.png"></li>
                <li data-value="2">30~50万 <img src="/public/img/images/btn-check.png"></li>
                <li data-value="3">50~100万 <img src="/public/img/images/btn-check.png"></li><br/>
                <li data-value="4">100~200万 <img src="/public/img/images/btn-check.png"></li>
                <li data-value="5">200万以上 <img src="/public/img/images/btn-check.png"></li>
            </ul>
            
            <p>
                <span>重 置</span>
                <span>完 成</span>
            </p> 
        </div>
    </aside>
    <div class="message_info_alert">
        <span>修改成功</span>
    </div>
</body>
<script type="text/javascript" src="/public/js/jquery1.7.2.js"></script>
<script type="text/javascript" src="/public/js/comment.js"></script>
<script type="text/javascript" src="/public/js/newBook.js"></script>
<script type="text/javascript">
    var type = "<?php echo $data['type'];?>";
    var ctype = "<?php echo isset($data['params']['category']) ? $data['params']['category'] : 0;?>";
</script>
</html>